// --- Copyright (c) 2006-2008 Stefan Kyntchev ---
// This software is written and copyrighted by Stefan Kyntchev 
// and BeyondPod Team members. All rights are reserved.
// Author contact: support@beyondpod.mobi
// ------------------------------------------------------------------------
// This file is part of BeyondPod RSS Feed Reader and Podcast manager
// (www.codeplex.com/BeyondPod) 
// BeyondPod is free software: you can redistribute it and/or modify 
// it under the terms of the GNU General Public License as published by 
// the Free Software Foundation, either version 3 of the License, or 
// (at your option) any later version. 
//  
// BeyondPod is distributed in the hope that it will be useful, 
// but WITHOUT ANY WARRANTY; without even the implied warranty of 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
// GNU General Public License for more details. 
//  
// You should have received a copy of the GNU General Public License
// along with BeyondPod. If not, see <http://www.gnu.org/licenses/>
// ------------------------------------------------------------------------
// COPYRIGHT NOTICE: This copyright notice may NOT be removed, obscured or modified 
// without written consent from the author.
// --- End copyright notice --- 


using System;
using svs.Mobile.BeyondMedia.FeedCore;
using svs.Mobile.BeyondMedia.Objects;

namespace svs.Mobile.BeyondMedia.Controls
{
	internal interface IPlayerControl
	{
		event EventHandler BackClick;
		event EventHandler StreamPositionChange;
		event EventHandler PlayError;
		event EventHandler MediaEnd;
		event EventHandler StartPlaying;
		event EventHandler Paused;
		event EventHandler Stopped;

		/// <summary>
		/// Changes the volume by an increment.
		/// </summary>
		/// <param name="i_direction">The i_direction.</param>
		void ChangeVolume(Helpers.MoveDirection i_direction);

		/// <summary>
		/// Skips in the specified i_direction.
		/// </summary>
		/// <param name="i_direction">The i_direction.</param>
		/// <param name="i_duration">The i_duration.</param>
		void Skip(Helpers.MoveDirection i_direction, int i_duration);

		/// <summary>
		/// Pauses the playback.
		/// </summary>
		void Pause();

		/// <summary>
		/// Resumes the the playback.
		/// </summary>
		void Play();

		/// <summary>
		/// Stops the playback.
		/// </summary>
		void Stop();

		/// <summary>
		/// Plays the track.
		/// </summary>
		/// <param name="track">The track.</param>
		void PlayTrack(Track track);

		/// <summary>
		/// Closes the media file.
		/// </summary>
		void CloseStream();

		/// <summary>
		/// Saves the current position in the current file.
		/// </summary>
		void SaveCurrentPosition(Track.PlayMode i_mode);

		/// <summary>
		/// Called when the Application is closing.
		/// </summary>
		void OnClosing();

		/// <summary>
		/// Called when the player skin has changed.
		/// </summary>
		void OnSkinChanged(ISkin skin);

		/// <summary>
		/// Gets the current track.
		/// </summary>
		/// <value>The current track.</value>
		Track CurrentTrack { get; set; }

		/// <summary>
		/// Gets a value indicating whether this instance is playing.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if this instance is playing; otherwise, <c>false</c>.
		/// </value>
		bool IsPlaying { get; }

		/// <summary>
		/// Gets a value indicating whether this instance is paused.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if this instance is playing; otherwise, <c>false</c>.
		/// </value>
		bool IsPaused { get; }

		/// <summary>
		/// Gets or sets the current stream position.
		/// </summary>
		/// <value>The current stream position.</value>
		double CurrentStreamPosition { get; set; }

		/// <summary>
		/// Gets the current stream duration.
		/// </summary>
		/// <value>The current stream duration.</value>
		double CurrentStreamDuration { get; }

		/// <summary>
		/// Gets the version of windows media player.
		/// </summary>
		/// <value>The WMP version.</value>
		string PlayerVersion { get; }

		/// <summary>
		/// Sets teh volume level
		/// </summary>
		int VolumeLevel { get; set; }

		bool Visible { get; set; }
		int Height { get; set; }
		int Width { get; set; }
		int Top { get; set; }
		int Left { get; set; }
	}
}